<template>
 <view class="my-search-container" @click="goto" :style="{'background-color' : bgcolor}">
   <view class="my-search-box" :style="{'border-radius':radius+'px'}">
     <uni-icons type="search" size="17"></uni-icons>
     <text class="placeholder">搜索</text>
   </view>
   
 </view>
</template>
<script>
  export default {
    //自定义属性
    props:{
      bgcolor:{
        type:String,
        default:'#C00000'
      },
      radius:{
        type:Number,
        default:18
      }
    },
    data() {
      return {
        
      }
    },
      
    methods:{
      goto(){
        console.log('强强强强')
        this.$emit('click')
      }
    }
  }
</script>
<style lang="scss">
.my-search-container{
  //background-color: #C00000;
  height: 45px;
  display: flex;
  padding: 0 10px;
  align-items: center;
  .my-search-box{
    //border-radius: 18px;
    width: 100%;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    .placeholder{
      font-size: 14px;
      margin-left: 5px;
    }
  }
}  
  
  
</style>
